]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
src: Name all the timeouts and idles
authorBastien Nocera <hadess@hadess.net>
Thu, 10 Apr 2014 17:27:23 +0000 (19:27 +0200)
committerBastien Nocera <hadess@hadess.net>
Thu, 10 Apr 2014 17:38:04 +0000 (19:38 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=727983

13 files changed:
src/calendar-server/calendar-sources.c
src/calendar-server/gnome-shell-calendar-server.c
src/hotplug-sniffer/hotplug-sniffer.c
src/hotplug-sniffer/shell-mime-sniffer.c
src/shell-app-usage.c
src/shell-global.c
src/shell-perf-helper.c
src/shell-perf-log.c
src/shell-polkit-authentication-agent.c
src/shell-recorder-src.c
src/shell-recorder.c
src/st/st-scroll-bar.c
src/st/st-theme-context.c

index cc9cf1d79265f67cc7155df9a6eda6cb09392798..219fc451fa14b32bcd97458bae1cb7c0a6999347 100644 (file)
@@ -369,6 +369,7 @@ backend_died_cb (EClient *client, CalendarSourceData *source_data)
 
   source_data->timeout_id = g_timeout_add_seconds (2, backend_restart,
                                                   source_data);
+  g_source_set_name_by_id (source_data->timeout_id, "[gnome-shell] backend_restart");
 }
 
 static void
index d35306624925b141edad497299e45a0de067c79c..da7d6e8fe3729042285036f19369d14bc95ee82a 100644 (file)
@@ -537,6 +537,7 @@ app_schedule_changed (App *app)
       app->changed_timeout_id = g_timeout_add (2000,
                                                on_app_schedule_changed_cb,
                                                app);
+      g_source_set_name_by_id (app->changed_timeout_id, "[gnome-shell] on_app_schedule_changed_cb");
     }
 }
 
index 239f8b91b0301c60040ae64304af00d9b4d06d49..c229af51fe66ec2cb27b5cbcd1a641e20a40219c 100644 (file)
@@ -76,6 +76,7 @@ ensure_autoquit_on (void)
   autoquit_id = 
     g_timeout_add_seconds (AUTOQUIT_TIMEOUT,
                            autoquit_timeout_cb, NULL);
+  g_source_set_name_by_id (autoquit_id, "[gnome-shell] autoquit_timeout_cb");
 }
 
 typedef struct {
index d4253ca32a5a149a663399c524f92eb77ee579d3..723249692669ed22e5be086cb6212cac166ed830 100644 (file)
@@ -590,6 +590,7 @@ shell_mime_sniffer_sniff_async (ShellMimeSniffer *self,
   self->priv->watchdog_id =
     g_timeout_add (WATCHDOG_TIMEOUT,
                    watchdog_timeout_reached_cb, self);
+  g_source_set_name_by_id (self->priv->watchdog_id, "[gnome-shell] watchdog_timeout_reached_cb");
 
   start_loading_file (self);
 }
index c733ce4c52634af897221f06d4b6971165afd6d0..799028109920e0108821c2f6caf1f8ffdec956cc 100644 (file)
@@ -567,6 +567,7 @@ ensure_queued_save (ShellAppUsage *self)
   if (self->save_id != 0)
     return;
   self->save_id = g_timeout_add_seconds (SAVE_APPS_TIMEOUT_SECONDS, idle_save_application_usage, self);
+  g_source_set_name_by_id (self->save_id, "[gnome-shell] idle_save_application_usage");
 }
 
 /* Clean up apps we see rarely.
index d6de365ea28a822fda7c5dba39782b50f47c8509..78d149faed9b6ec266521feb3fbe44628253f91f 100644 (file)
@@ -1434,9 +1434,12 @@ schedule_leisure_functions (ShellGlobal *global)
    * in another thread.
    */
   if (!global->leisure_function_id)
-    global->leisure_function_id = g_idle_add_full (G_PRIORITY_LOW,
-                                                   run_leisure_functions,
-                                                   global, NULL);
+    {
+      global->leisure_function_id = g_idle_add_full (G_PRIORITY_LOW,
+                                                     run_leisure_functions,
+                                                     global, NULL);
+      g_source_set_name_by_id (global->leisure_function_id, "[gnome-shell] run_leisure_functions");
+    }
 }
 
 /**
index 92de68b0a51f907a3938a8be507131e513dcd46d..6d955bfd51762d065a960e88931c51a0ba3cbfc4 100644 (file)
@@ -81,6 +81,7 @@ establish_timeout ()
     g_source_remove (timeout_id);
 
   timeout_id = g_timeout_add (opt_idle_timeout * 1000, on_timeout, NULL);
+  g_source_set_name_by_id (timeout_id, "[gnome-shell] on_timeout");
 }
 
 static void
index 72c4210e2ffd68e3636479f1908dadcac8f21ada..6c1f293ce5f74b654168f14a69dfe1bd09ca13e7 100644 (file)
@@ -223,6 +223,7 @@ shell_perf_log_set_enabled (ShellPerfLog *perf_log,
           perf_log->statistics_timeout_id = g_timeout_add (STATISTIC_COLLECTION_INTERVAL_MS,
                                                            statistics_timeout,
                                                            perf_log);
+          g_source_set_name_by_id (perf_log->statistics_timeout_id, "[gnome-shell] statistics_timeout");
         }
       else
         {
index f1e8bf6d09ae58573da80c6577ea4ed11058c730..3a15e2dd2d70fb7aab350caace98951462cf8333 100644 (file)
@@ -300,11 +300,14 @@ on_request_cancelled (GCancellable *cancellable,
                       gpointer      user_data)
 {
   AuthRequest *request = user_data;
+  guint id;
+
   /* post-pone to idle to handle GCancellable deadlock in
    *
    *  https://bugzilla.gnome.org/show_bug.cgi?id=642968
    */
-  g_idle_add (handle_cancelled_in_idle, request);
+  id = g_idle_add (handle_cancelled_in_idle, request);
+  g_source_set_name_by_id (id, "[gnome-shell] handle_cancelled_in_idle");
 }
 
 static void
index 5e325cf02d386a6f44ece8f1981e6310c78edac6..dd4b377345c980b41ca8754434d23a354e3a9e04 100644 (file)
@@ -78,7 +78,10 @@ shell_recorder_src_update_memory_used (ShellRecorderSrc *src,
   g_mutex_lock (src->mutex);
   src->memory_used += delta;
   if (src->memory_used_update_idle == 0)
-    src->memory_used_update_idle = g_idle_add (shell_recorder_src_memory_used_update_idle, src);
+    {
+      src->memory_used_update_idle = g_idle_add (shell_recorder_src_memory_used_update_idle, src);
+      g_source_set_name_by_id (src->memory_used_update_idle, "[gnome-shell] shell_recorder_src_memory_used_update_idle");
+    }
   g_mutex_unlock (src->mutex);
 }
 
index 23f2c072c554a0f8439a00d366d896d3b05f6520..1a0b208a0122a7e11df65fab34cb8e5adc4d8fd6 100644 (file)
@@ -311,6 +311,7 @@ recorder_add_redraw_timeout (ShellRecorder *recorder)
       recorder->redraw_timeout = g_timeout_add (MAXIMUM_PAUSE_TIME,
                                                 recorder_redraw_timeout,
                                                 recorder);
+      g_source_set_name_by_id (recorder->redraw_timeout, "[gnome-shell] recorder_redraw_timeout");
     }
 }
 
@@ -533,8 +534,11 @@ recorder_queue_redraw (ShellRecorder *recorder)
    * we need to queue a "low priority redraw" after timeline updates
    */
   if (recorder->state == RECORDER_STATE_RECORDING && recorder->redraw_idle == 0)
-    recorder->redraw_idle = g_idle_add_full (CLUTTER_PRIORITY_REDRAW + 1,
-                                             recorder_idle_redraw, recorder, NULL);
+    {
+      recorder->redraw_idle = g_idle_add_full (CLUTTER_PRIORITY_REDRAW + 1,
+                                               recorder_idle_redraw, recorder, NULL);
+      g_source_set_name_by_id (recorder->redraw_idle, "[gnome-shell] recorder_idle_redraw");
+    }
 }
 
 static void
@@ -720,9 +724,12 @@ static void
 recorder_add_update_pointer_timeout (ShellRecorder *recorder)
 {
   if (!recorder->update_pointer_timeout)
-    recorder->update_pointer_timeout = g_timeout_add (UPDATE_POINTER_TIME,
-                                                      recorder_update_pointer_timeout,
-                                                      recorder);
+    {
+      recorder->update_pointer_timeout = g_timeout_add (UPDATE_POINTER_TIME,
+                                                        recorder_update_pointer_timeout,
+                                                        recorder);
+      g_source_set_name_by_id (recorder->update_pointer_timeout, "[gnome-shell] recorder_update_pointer_timeout");
+    }
 }
 
 static void
@@ -1336,9 +1343,12 @@ recorder_pipeline_on_memory_used_changed (ShellRecorderSrc *src,
     return;
 
   if (recorder->update_memory_used_timeout == 0)
-    recorder->update_memory_used_timeout = g_timeout_add (UPDATE_MEMORY_USED_DELAY,
-                                                          recorder_update_memory_used_timeout,
-                                                          recorder);
+    {
+      recorder->update_memory_used_timeout = g_timeout_add (UPDATE_MEMORY_USED_DELAY,
+                                                            recorder_update_memory_used_timeout,
+                                                            recorder);
+      g_source_set_name_by_id (recorder->update_memory_used_timeout, "[gnome-shell] recorder_update_memory_used_timeout");
+    }
 }
 
 static void
index f908101ddc4ee451aec76481269da457b00f8f31..b8161ea35b4203a966a9873b9a740c1b0d9e7d0f 100644 (file)
@@ -692,6 +692,7 @@ trough_paging_cb (StScrollBar *self)
         PAGING_INITIAL_REPEAT_TIMEOUT,
         (GSourceFunc) trough_paging_cb,
         self);
+      g_source_set_name_by_id (self->priv->paging_source_id, "[gnome-shell] trough_paging_cb");
     }
   else if (self->priv->paging_event_no == 1)
     {
@@ -703,6 +704,7 @@ trough_paging_cb (StScrollBar *self)
         PAGING_SUBSEQUENT_REPEAT_TIMEOUT,
         (GSourceFunc) trough_paging_cb,
         self);
+      g_source_set_name_by_id (self->priv->paging_source_id, "[gnome-shell] trough_paging_cb");
     }
   else
     {
index 34ac2955b3030bb6a7d3023dc5c7bdbca8aeaaba..25d03cceb7e662970301055ec8106f0e42fc02a3 100644 (file)
@@ -246,12 +246,15 @@ static void
 on_icon_theme_changed (StTextureCache *cache,
                        StThemeContext *context)
 {
+  guint id;
+
   /* Note that an icon theme change isn't really a change of the StThemeContext;
    * the style information has changed. But since the style factors into the
    * icon_name => icon lookup, faking a theme context change is a good way
    * to force users such as StIcon to look up icons again.
    */
-  g_idle_add ((GSourceFunc) changed_idle, context);
+  id = g_idle_add ((GSourceFunc) changed_idle, context);
+  g_source_set_name_by_id (id, "[gnome-shell] changed_idle");
 }
 
 /**